<template>
  <div id="app">
    <a-layout id="components-layout-demo-custom-trigger" style="height:100%">
      <a-layout-sider v-model="collapsed" :trigger="null" collapsible>
        <div class="logo" />
        <a-menu theme="dark" mode="inline" :default-selected-keys="['1']">
          <a-menu-item key="1">
            <a-icon type="dashboard" />
            <span><router-link to="/">数据看板</router-link></span>
          </a-menu-item>
          <a-menu-item key="2">
            <a-icon type="transaction" />
            <span><router-link to="/fee">缴费记录</router-link></span>
          </a-menu-item>
          <a-menu-item key="3">
            <a-icon type="usergroup-delete" />
            <span><router-link to="/about">学生管理</router-link></span>
          </a-menu-item>
          <a-menu-item key="4">
            <a-icon type="account-book" />
            <span>班费记录</span>
          </a-menu-item>
        </a-menu>
      </a-layout-sider>
      <a-layout>
        <a-layout-header style="background: #fff; padding: 0;text-align: left;">
          <a-icon
              class="trigger"
              :type="collapsed ? 'menu-unfold' : 'menu-fold'"
              @click="() => (collapsed = !collapsed)"
          />
        </a-layout-header>
        <a-layout-content
            :style="{ margin: '24px 16px', textAlign:'left', minHeight: '280px' }"
        >
          <router-view/>
        </a-layout-content>
      </a-layout>
    </a-layout>

  </div>
</template>
<script>
export default {
  data() {
    return {
      collapsed: false,
    };
  },
};
</script>
<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  height: 100vh;
}
#components-layout-demo-custom-trigger .trigger {
  font-size: 18px;
  line-height: 64px;
  padding: 0 24px;
  cursor: pointer;
  transition: color 0.3s;
  height: 100%;
}

#components-layout-demo-custom-trigger .trigger:hover {
  color: #1890ff;
}

#components-layout-demo-custom-trigger .logo {
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  margin: 16px;
}
.ant-menu-item{
  a{
    color: rgba(255, 255, 255, 0.65);
  }
  a:hover {
    color:#fff;
  }
  .ant-menu-item-selected{
    a{
      color:#fff;
    }
  }
}
</style>
